package com.njym.java.security.app.biz;

import com.github.pagehelper.PageHelper;
import com.njym.java.security.app.entity.FamilyWalletRecord;
import com.njym.java.security.app.entity.FamilyWalletRecordVo;
import com.njym.java.security.app.mapper.FamilyWalletRecordMapper;
import com.njym.java.security.common.biz.BaseBiz;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 用户钱包记录 包括爱能币与积分
 *
 * @author lijie
 * @email 717057076@qq.com
 * @date 2019-12-18 14:30:47
 */
@Service
public class FamilyWalletRecordBiz extends BaseBiz<FamilyWalletRecordMapper,FamilyWalletRecord> {
    public List<FamilyWalletRecordVo> getHistory(Integer userId) {
        return mapper.getHistory(userId);
    }

    public Integer getHistoryPage(Integer userId) {
        return mapper.getHistoryPage(userId);
    }

    public List<FamilyWalletRecordVo> getMyPopularHistory(Integer id) {
        return mapper.getMyPopularHistory(id);
    }

    public List<FamilyWalletRecordVo> queryDaiLiDetail(Integer id, Integer page, Integer limit, String startDate, String endDate, String phone){
        PageHelper.startPage(page, limit);
        return mapper.queryDaiLiDetail(id, startDate, endDate, phone);
    }

    public List<FamilyWalletRecordVo> queryTeacherDetail(Integer id, Integer page, Integer limit){
        PageHelper.startPage(page, limit);
        return mapper.queryTeacherDetail(id);
    }

    public List<FamilyWalletRecordVo> queryTeacherDetail_2(Integer id, Integer page, Integer limit, String startDate, String endDate, String phone) {
        PageHelper.startPage(page, limit);
        return mapper.queryTeacherDetail_2(id, startDate, endDate, phone);
    }
}